<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<%@ page import="java.util.*, pl.edu.agh.bd2.domain.Subject" %>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Subjects</title>
</head>
<body>
	<center>
		<h1>Subjects</h1>
		<form action="/webRegister/subjectsServlet.do" method="post">
			<select name="selectedSubject" size="5">
				<%for(Subject subject : (HashSet<Subject>)session.getAttribute("subjects")){%>
					<option><%=subject.getName()%></option>
				<%} %>	
			</select>			
			<br><tr><td colspan="2"><input type="submit" id="subject" value="select"/></td></tr>			
		</form>
		<button onclick="window.location.href='/webRegister/newSubject.jsp'">add subject</button>
	</center>
</body>
</html>